package cn.com.oceansoft.business.os.persistence;

import cn.com.oceansoft.business.base.entity.Query;
import cn.com.oceansoft.business.os.entity.Dept;
import cn.com.oceansoft.business.os.entity.Lucky;
import cn.com.oceansoft.business.os.entity.User;
import cn.com.oceansoft.business.sys.entity.SysRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by zhangxl on 2016/12/21.
 */

@Repository
public interface ILuckyMapper {

    List<Lucky> findPageByCondition(Query query);

    int save(Lucky lucky);

    int update(Lucky lucky);

    Lucky findById(int id);

    void deleteLuckyById(int luckyId);

    List<User> findLuckyPersonByLuckyId(int luckyId);

    void deleteLuckyPersonByLuckyId(int luckyId);

    void saveLuckyPersonByBatch(@Param("list") List<User> list);

    List<Dept> findDept();

    void saveLuckyPerson(int luckyId,int userId);

    List<User> check4User(int luckyId);

    List<User> findLuckyBoyById(int luckyId);

    Lucky findLuckyById(int luckyId);
}
